package com.spic.business.train.trainUserAnswer.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.spic.business.train.trainUserAnswer.mapper.TrainUserAnswerMapper;
import com.spic.business.train.trainUserAnswer.domain.TrainUserAnswer;
import com.spic.business.train.trainUserAnswer.service.ITrainUserAnswerService;

/**
 * 用户考试答案Service业务层处理
 * 
 * @author spic
 * @date 2021-10-15
 */
@Service
public class TrainUserAnswerServiceImpl implements ITrainUserAnswerService 
{
    @Autowired
    private TrainUserAnswerMapper trainUserAnswerMapper;

    /**
     * 查询用户考试答案
     * 
     * @param id 用户考试答案主键
     * @return 用户考试答案
     */
    @Override
    public TrainUserAnswer selectTrainUserAnswerById(String id)
    {
        return trainUserAnswerMapper.selectTrainUserAnswerById(id);
    }

    /**
     * 查询用户考试答案列表
     * 
     * @param trainUserAnswer 用户考试答案
     * @return 用户考试答案
     */
    @Override
    public List<TrainUserAnswer> selectTrainUserAnswerList(TrainUserAnswer trainUserAnswer)
    {
        return trainUserAnswerMapper.selectTrainUserAnswerList(trainUserAnswer);
    }

    /**
     * 新增用户考试答案
     * 
     * @param trainUserAnswer 用户考试答案
     * @return 结果
     */
    @Override
    public int insertTrainUserAnswer(TrainUserAnswer trainUserAnswer)
    {
        return trainUserAnswerMapper.insertTrainUserAnswer(trainUserAnswer);
    }

    /**
     * 修改用户考试答案
     * 
     * @param trainUserAnswer 用户考试答案
     * @return 结果
     */
    @Override
    public int updateTrainUserAnswer(TrainUserAnswer trainUserAnswer)
    {
        return trainUserAnswerMapper.updateTrainUserAnswer(trainUserAnswer);
    }

    /**
     * 批量删除用户考试答案
     * 
     * @param ids 需要删除的用户考试答案主键
     * @return 结果
     */
    @Override
    public int deleteTrainUserAnswerByIds(String[] ids)
    {
        return trainUserAnswerMapper.deleteTrainUserAnswerByIds(ids);
    }

    /**
     * 删除用户考试答案信息
     * 
     * @param id 用户考试答案主键
     * @return 结果
     */
    @Override
    public int deleteTrainUserAnswerById(String id)
    {
        return trainUserAnswerMapper.deleteTrainUserAnswerById(id);
    }
}
